\(\int \frac {\cos ^2(c+d x) (A+B \cos (c+d x)+C \cos ^2(c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx\) [1047]
Optimal result
Integrand size = 43, antiderivative size = 426 \[
\int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=-\frac {2 \left (40 a^3 b B-25 a b^3 B-6 a^2 b^2 (5 A-4 C)-48 a^4 C+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (40 a^2 b B+5 b^3 B-48 a^3 C-6 a b^2 (5 A+2 C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 b B-5 b^3 B-3 a b^2 (5 A-3 C)-24 a^3 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}+\frac {2 \left (5 A b^2-5 a b B+6 a^2 C-b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}
\]
[Out]
-2*(A*b^2-a*(B*b-C*a))*cos(d*x+c)^2*sin(d*x+c)/b/(a^2-b^2)/d/(a+b*cos(d*x+c))^(1/2)+2/15*(20*B*a^2*b-5*B*b^3-3
*a*b^2*(5*A-3*C)-24*a^3*C)*sin(d*x+c)*(a+b*cos(d*x+c))^(1/2)/b^3/(a^2-b^2)/d+2/5*(5*A*b^2-5*B*a*b+6*C*a^2-C*b^
2)*cos(d*x+c)*sin(d*x+c)*(a+b*cos(d*x+c))^(1/2)/b^2/(a^2-b^2)/d-2/15*(40*B*a^3*b-25*B*a*b^3-6*a^2*b^2*(5*A-4*C
)-48*a^4*C+3*b^4*(5*A+3*C))*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/
2)*(b/(a+b))^(1/2))*(a+b*cos(d*x+c))^(1/2)/b^4/(a^2-b^2)/d/((a+b*cos(d*x+c))/(a+b))^(1/2)+2/15*(40*B*a^2*b+5*B
*b^3-48*a^3*C-6*a*b^2*(5*A+2*C))*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),
2^(1/2)*(b/(a+b))^(1/2))*((a+b*cos(d*x+c))/(a+b))^(1/2)/b^4/d/(a+b*cos(d*x+c))^(1/2)
Rubi [A] (verified)
Time = 1.04 (sec) , antiderivative size = 426, normalized size of antiderivative = 1.00, number of
steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.186, Rules used = {3126, 3128, 3102, 2831, 2742,
2740, 2734, 2732} \[
\int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=-\frac {2 \sin (c+d x) \cos ^2(c+d x) \left (A b^2-a (b B-a C)\right )}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}+\frac {2 \sin (c+d x) \cos (c+d x) \left (6 a^2 C-5 a b B+5 A b^2-b^2 C\right ) \sqrt {a+b \cos (c+d x)}}{5 b^2 d \left (a^2-b^2\right )}+\frac {2 \sin (c+d x) \left (-24 a^3 C+20 a^2 b B-3 a b^2 (5 A-3 C)-5 b^3 B\right ) \sqrt {a+b \cos (c+d x)}}{15 b^3 d \left (a^2-b^2\right )}+\frac {2 \left (-48 a^3 C+40 a^2 b B-6 a b^2 (5 A+2 C)+5 b^3 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-48 a^4 C+40 a^3 b B-6 a^2 b^2 (5 A-4 C)-25 a b^3 B+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}
\]
[In]
Int[(Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^(3/2),x]
[Out]
(-2*(40*a^3*b*B - 25*a*b^3*B - 6*a^2*b^2*(5*A - 4*C) - 48*a^4*C + 3*b^4*(5*A + 3*C))*Sqrt[a + b*Cos[c + d*x]]*
EllipticE[(c + d*x)/2, (2*b)/(a + b)])/(15*b^4*(a^2 - b^2)*d*Sqrt[(a + b*Cos[c + d*x])/(a + b)]) + (2*(40*a^2*
b*B + 5*b^3*B - 48*a^3*C - 6*a*b^2*(5*A + 2*C))*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c + d*x)/2, (2*b
)/(a + b)])/(15*b^4*d*Sqrt[a + b*Cos[c + d*x]]) - (2*(A*b^2 - a*(b*B - a*C))*Cos[c + d*x]^2*Sin[c + d*x])/(b*(
a^2 - b^2)*d*Sqrt[a + b*Cos[c + d*x]]) + (2*(20*a^2*b*B - 5*b^3*B - 3*a*b^2*(5*A - 3*C) - 24*a^3*C)*Sqrt[a + b
*Cos[c + d*x]]*Sin[c + d*x])/(15*b^3*(a^2 - b^2)*d) + (2*(5*A*b^2 - 5*a*b*B + 6*a^2*C - b^2*C)*Cos[c + d*x]*Sq
rt[a + b*Cos[c + d*x]]*Sin[c + d*x])/(5*b^2*(a^2 - b^2)*d)
Rule 2732
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[2*(Sqrt[a + b]/d)*EllipticE[(1/2)*(c - Pi/2
+ d*x), 2*(b/(a + b))], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
Rule 2734
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[Sqrt[a + b*Sin[c + d*x]]/Sqrt[(a + b*Sin[c +
d*x])/(a + b)], Int[Sqrt[a/(a + b) + (b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 -
b^2, 0] && !GtQ[a + b, 0]
Rule 2740
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/(d*Sqrt[a + b]))*EllipticF[(1/2)*(c - P
i/2 + d*x), 2*(b/(a + b))], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[a + b, 0]
Rule 2742
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[Sqrt[(a + b*Sin[c + d*x])/(a + b)]/Sqrt[a
+ b*Sin[c + d*x]], Int[1/Sqrt[a/(a + b) + (b/(a + b))*Sin[c + d*x]], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a
^2 - b^2, 0] && !GtQ[a + b, 0]
Rule 2831
Int[((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])/Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[(b*c
- a*d)/b, Int[1/Sqrt[a + b*Sin[e + f*x]], x], x] + Dist[d/b, Int[Sqrt[a + b*Sin[e + f*x]], x], x] /; FreeQ[{a
, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0]
Rule 3102
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Dist[1/(
b*(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x],
x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Rule 3126
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*s
in[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(c^2*C - B*c*d + A*d^2))*Cos[e
+ f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(n + 1)*(c^2 - d^2))), x] + Dist[1/(d*(n + 1)
*(c^2 - d^2)), Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[A*d*(b*d*m + a*c*(n + 1)) +
(c*C - B*d)*(b*c*m + a*d*(n + 1)) - (d*(A*(a*d*(n + 2) - b*c*(n + 1)) + B*(b*d*(n + 1) - a*c*(n + 2))) - C*(b*
c*d*(n + 1) - a*(c^2 + d^2*(n + 1))))*Sin[e + f*x] + b*(d*(B*c - A*d)*(m + n + 2) - C*(c^2*(m + 1) + d^2*(n +
1)))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2
, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 0] && LtQ[n, -1]
Rule 3128
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)
*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*(a + b*Sin[e
+ f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n + 2))), x] + Dist[1/(d*(m + n + 2)), Int[(a + b*Sin[e + f*
x])^(m - 1)*(c + d*Sin[e + f*x])^n*Simp[a*A*d*(m + n + 2) + C*(b*c*m + a*d*(n + 1)) + (d*(A*b + a*B)*(m + n +
2) - C*(a*c - b*d*(m + n + 1)))*Sin[e + f*x] + (C*(a*d*m - b*c*(m + 1)) + b*B*d*(m + n + 2))*Sin[e + f*x]^2, x
], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d
^2, 0] && GtQ[m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
Rubi steps \begin{align*}
\text {integral}& = -\frac {2 \left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}-\frac {2 \int \frac {\cos (c+d x) \left (2 \left (A b^2-a (b B-a C)\right )+\frac {1}{2} b (b B-a (A+C)) \cos (c+d x)-\frac {1}{2} \left (5 A b^2-5 a b B+6 a^2 C-b^2 C\right ) \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx}{b \left (a^2-b^2\right )} \\ & = -\frac {2 \left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (5 A b^2-5 a b B+6 a^2 C-b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {4 \int \frac {-\frac {1}{2} a \left (5 A b^2-5 a b B+6 a^2 C-b^2 C\right )+\frac {1}{4} b \left (5 A b^2-5 a b B+2 a^2 C+3 b^2 C\right ) \cos (c+d x)-\frac {1}{4} \left (20 a^2 b B-5 b^3 B-3 a b^2 (5 A-3 C)-24 a^3 C\right ) \cos ^2(c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{5 b^2 \left (a^2-b^2\right )} \\ & = -\frac {2 \left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 b B-5 b^3 B-3 a b^2 (5 A-3 C)-24 a^3 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}+\frac {2 \left (5 A b^2-5 a b B+6 a^2 C-b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {8 \int \frac {\frac {1}{8} b \left (10 a^2 b B+5 b^3 B-12 a^3 C-3 a b^2 (5 A+C)\right )+\frac {1}{8} \left (40 a^3 b B-25 a b^3 B-6 a^2 b^2 (5 A-4 C)-48 a^4 C+3 b^4 (5 A+3 C)\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^3 \left (a^2-b^2\right )} \\ & = -\frac {2 \left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 b B-5 b^3 B-3 a b^2 (5 A-3 C)-24 a^3 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}+\frac {2 \left (5 A b^2-5 a b B+6 a^2 C-b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}+\frac {\left (40 a^2 b B+5 b^3 B-48 a^3 C-6 a b^2 (5 A+2 C)\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^4}-\frac {\left (40 a^3 b B-25 a b^3 B-6 a^2 b^2 (5 A-4 C)-48 a^4 C+3 b^4 (5 A+3 C)\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{15 b^4 \left (a^2-b^2\right )} \\ & = -\frac {2 \left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 b B-5 b^3 B-3 a b^2 (5 A-3 C)-24 a^3 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}+\frac {2 \left (5 A b^2-5 a b B+6 a^2 C-b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {\left (\left (40 a^3 b B-25 a b^3 B-6 a^2 b^2 (5 A-4 C)-48 a^4 C+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{15 b^4 \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {\left (\left (40 a^2 b B+5 b^3 B-48 a^3 C-6 a b^2 (5 A+2 C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{15 b^4 \sqrt {a+b \cos (c+d x)}} \\ & = -\frac {2 \left (40 a^3 b B-25 a b^3 B-6 a^2 b^2 (5 A-4 C)-48 a^4 C+3 b^4 (5 A+3 C)\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (40 a^2 b B+5 b^3 B-48 a^3 C-6 a b^2 (5 A+2 C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (A b^2-a (b B-a C)\right ) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 b B-5 b^3 B-3 a b^2 (5 A-3 C)-24 a^3 C\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}+\frac {2 \left (5 A b^2-5 a b B+6 a^2 C-b^2 C\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d} \\
\end{align*}
Mathematica [A] (verified)
Time = 3.80 (sec) , antiderivative size = 328, normalized size of antiderivative = 0.77
\[
\int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\frac {\frac {2 b^2 \left (-10 a^2 b B-5 b^3 B+12 a^3 C+3 a b^2 (5 A+C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )}{(a-b) (a+b)}+\frac {2 \left (-40 a^3 b B+25 a b^3 B+6 a^2 b^2 (5 A-4 C)+48 a^4 C-3 b^4 (5 A+3 C)\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),\frac {2 b}{a+b}\right )\right )}{(a-b) (a+b)}+\frac {30 a^2 b \left (A b^2+a (-b B+a C)\right ) \sin (c+d x)}{-a^2+b^2}+2 b (5 b B-9 a C) (a+b \cos (c+d x)) \sin (c+d x)+3 b^2 C (a+b \cos (c+d x)) \sin (2 (c+d x))}{15 b^4 d \sqrt {a+b \cos (c+d x)}}
\]
[In]
Integrate[(Cos[c + d*x]^2*(A + B*Cos[c + d*x] + C*Cos[c + d*x]^2))/(a + b*Cos[c + d*x])^(3/2),x]
[Out]
((2*b^2*(-10*a^2*b*B - 5*b^3*B + 12*a^3*C + 3*a*b^2*(5*A + C))*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*EllipticF[(c
+ d*x)/2, (2*b)/(a + b)])/((a - b)*(a + b)) + (2*(-40*a^3*b*B + 25*a*b^3*B + 6*a^2*b^2*(5*A - 4*C) + 48*a^4*C
- 3*b^4*(5*A + 3*C))*Sqrt[(a + b*Cos[c + d*x])/(a + b)]*((a + b)*EllipticE[(c + d*x)/2, (2*b)/(a + b)] - a*El
lipticF[(c + d*x)/2, (2*b)/(a + b)]))/((a - b)*(a + b)) + (30*a^2*b*(A*b^2 + a*(-(b*B) + a*C))*Sin[c + d*x])/(
-a^2 + b^2) + 2*b*(5*b*B - 9*a*C)*(a + b*Cos[c + d*x])*Sin[c + d*x] + 3*b^2*C*(a + b*Cos[c + d*x])*Sin[2*(c +
d*x)])/(15*b^4*d*Sqrt[a + b*Cos[c + d*x]])
Maple [B] (verified)
Leaf count of result is larger than twice the leaf count of optimal. \(1334\) vs. \(2(462)=924\).
Time = 10.50 (sec) , antiderivative size = 1335, normalized size of antiderivative =
3.13
| | |
method | result | size |
| | |
default |
\(\text {Expression too large to display}\) |
\(1335\) |
parts |
\(\text {Expression too large to display}\) |
\(2560\) |
| | |
|
|
|
[In]
int(cos(d*x+c)^2*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(3/2),x,method=_RETURNVERBOSE)
[Out]
-(-(-2*cos(1/2*d*x+1/2*c)^2*b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-b))^(1/2)/(-2*b*sin(1/2*d*x+1/2*c)^4+(a+b)*sin(1/2*d*x+1/2*c)^2)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),(-2*b
/(a-b))^(1/2)))/sin(1/2*d*x+1/2*c)/(-2*b*sin(1/2*d*x+1/2*c)^2+a+b)^(1/2)/d
Fricas [C] (verification not implemented)
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.23 (sec) , antiderivative size = 1012, normalized size of antiderivative = 2.38
\[
\int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\text {Too large to display}
\]
[In]
integrate(cos(d*x+c)^2*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(3/2),x, algorithm="fricas")
[Out]
-1/45*(6*(24*C*a^4*b^2 - 20*B*a^3*b^3 + 3*(5*A - 3*C)*a^2*b^4 + 5*B*a*b^5 - 3*(C*a^2*b^4 - C*b^6)*cos(d*x + c)
^2 + (6*C*a^3*b^3 - 5*B*a^2*b^4 - 6*C*a*b^5 + 5*B*b^6)*cos(d*x + c))*sqrt(b*cos(d*x + c) + a)*sin(d*x + c) + (
sqrt(2)*(-96*I*C*a^5*b + 80*I*B*a^4*b^2 - 12*I*(5*A - 7*C)*a^3*b^3 - 80*I*B*a^2*b^4 + 3*I*(25*A + 9*C)*a*b^5 -
15*I*B*b^6)*cos(d*x + c) + sqrt(2)*(-96*I*C*a^6 + 80*I*B*a^5*b - 12*I*(5*A - 7*C)*a^4*b^2 - 80*I*B*a^3*b^3 +
3*I*(25*A + 9*C)*a^2*b^4 - 15*I*B*a*b^5))*sqrt(b)*weierstrassPInverse(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 -
9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) + 3*I*b*sin(d*x + c) + 2*a)/b) + (sqrt(2)*(96*I*C*a^5*b - 80*I*B*a^4*b^2 +
12*I*(5*A - 7*C)*a^3*b^3 + 80*I*B*a^2*b^4 - 3*I*(25*A + 9*C)*a*b^5 + 15*I*B*b^6)*cos(d*x + c) + sqrt(2)*(96*I
*C*a^6 - 80*I*B*a^5*b + 12*I*(5*A - 7*C)*a^4*b^2 + 80*I*B*a^3*b^3 - 3*I*(25*A + 9*C)*a^2*b^4 + 15*I*B*a*b^5))*
sqrt(b)*weierstrassPInverse(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) - 3*I*
b*sin(d*x + c) + 2*a)/b) - 3*(sqrt(2)*(48*I*C*a^4*b^2 - 40*I*B*a^3*b^3 + 6*I*(5*A - 4*C)*a^2*b^4 + 25*I*B*a*b^
5 - 3*I*(5*A + 3*C)*b^6)*cos(d*x + c) + sqrt(2)*(48*I*C*a^5*b - 40*I*B*a^4*b^2 + 6*I*(5*A - 4*C)*a^3*b^3 + 25*
I*B*a^2*b^4 - 3*I*(5*A + 3*C)*a*b^5))*sqrt(b)*weierstrassZeta(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)
/b^3, weierstrassPInverse(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) + 3*I*b*
sin(d*x + c) + 2*a)/b)) - 3*(sqrt(2)*(-48*I*C*a^4*b^2 + 40*I*B*a^3*b^3 - 6*I*(5*A - 4*C)*a^2*b^4 - 25*I*B*a*b^
5 + 3*I*(5*A + 3*C)*b^6)*cos(d*x + c) + sqrt(2)*(-48*I*C*a^5*b + 40*I*B*a^4*b^2 - 6*I*(5*A - 4*C)*a^3*b^3 - 25
*I*B*a^2*b^4 + 3*I*(5*A + 3*C)*a*b^5))*sqrt(b)*weierstrassZeta(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2
)/b^3, weierstrassPInverse(4/3*(4*a^2 - 3*b^2)/b^2, -8/27*(8*a^3 - 9*a*b^2)/b^3, 1/3*(3*b*cos(d*x + c) - 3*I*b
*sin(d*x + c) + 2*a)/b)))/((a^2*b^6 - b^8)*d*cos(d*x + c) + (a^3*b^5 - a*b^7)*d)
Sympy [F(-1)]
Timed out. \[
\int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\text {Timed out}
\]
[In]
integrate(cos(d*x+c)**2*(A+B*cos(d*x+c)+C*cos(d*x+c)**2)/(a+b*cos(d*x+c))**(3/2),x)
[Out]
Timed out
Maxima [F]
\[
\int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{2}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x }
\]
[In]
integrate(cos(d*x+c)^2*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(3/2),x, algorithm="maxima")
[Out]
integrate((C*cos(d*x + c)^2 + B*cos(d*x + c) + A)*cos(d*x + c)^2/(b*cos(d*x + c) + a)^(3/2), x)
Giac [F]
\[
\int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\int { \frac {{\left (C \cos \left (d x + c\right )^{2} + B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{2}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x }
\]
[In]
integrate(cos(d*x+c)^2*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+b*cos(d*x+c))^(3/2),x, algorithm="giac")
[Out]
integrate((C*cos(d*x + c)^2 + B*cos(d*x + c) + A)*cos(d*x + c)^2/(b*cos(d*x + c) + a)^(3/2), x)
Mupad [F(-1)]
Timed out. \[
\int \frac {\cos ^2(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^{3/2}} \, dx=\int \frac {{\cos \left (c+d\,x\right )}^2\,\left (C\,{\cos \left (c+d\,x\right )}^2+B\,\cos \left (c+d\,x\right )+A\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x
\]
[In]
int((cos(c + d*x)^2*(A + B*cos(c + d*x) + C*cos(c + d*x)^2))/(a + b*cos(c + d*x))^(3/2),x)
[Out]
int((cos(c + d*x)^2*(A + B*cos(c + d*x) + C*cos(c + d*x)^2))/(a + b*cos(c + d*x))^(3/2), x)